<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>骡窝窝-编辑用户</title>
    <style>
        body{
            margin: 0px;
            padding: 0px;
            background-size: cover;
            background-repeat: no-repeat;
        }
        .container{
            background-color: white;
            width: 40vw;
            height: 60vh;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%,-50%);
            box-shadow: 0px 0px 10px 0px #222;
            padding: 20px;
            border-radius: 5px;
           
        }
        .container-form{
            width: 100%;
            height: 100%;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: center;
           
        }
        .form-image{
            width:200px;
            height:200px;
            line-height:200px;
            clip-path: circle(50% at 50% 50%);
            margin-bottom:30px;
            text-align: center;
            position: relative;/*绝对定位*/
          
        }
      
        .form-image>img{
            width: 100%;
            height:100%;
            cursor: pointer;
        }
       
        .form-input{
            width: 100%;
            height: 50px;
            margin-bottom:40px;
          
        }
        .form-input>input{
            width: 100%;
            height: 100%;
            font-size:20px;
            outline: none;
            border-radius: 5px;
        }
        .form-input-submit{
            border: 0px;
            color: white;
            font-size: 30px;
            background-color:#0e70fd;
            cursor: pointer;
            font-weight: bold;
        }
        .user-id{
            display: none;
        }
    </style>
</head>
<body>
    <div class="user-id"></div>
    <div class="container">
        <div class="container-form">
            <div class="form-image">
                <!--图片-->
                <img id="form-image-input" src="/images/background_login.jpg">
            </div>
            <div class="form-input">
                <input type="text" id="username" name="username" placeholder="输入用户名">
            </div>
            <div class="form-input">
                <input type="password" id="password" name="password" placeholder="输入密码">
            </div>
            <div class="form-input">
                <input class="form-input-submit" type="submit" value="提交">
            </div>
        </div>
    </div>

    <script>


        //点击提交修改信息
        let input_submit=document.getElementsByClassName('form-input-submit')[0];
        input_submit.onclick=function () {
            let imgURL=document.getElementById('form-image-input').src;
            let username=document.getElementById('username').value;
            let password=document.getElementById('password').value;
            window.location.href='/updateUser?imgURL='+imgURL+"&username="+username+"&password="+password;
        }
        
    </script>
</body>
</html>